/********************************************************************
	created:	2012/12/29   15:05
	file base:	staticex
	file ext:	h
	author:		$wuxfei@gmail.com$
*********************************************************************/

#ifndef _StaticEx_H
#define _StaticEx_H
/////////////////////////////////////////////////////////////////////////////
// CStaticEx window
#ifdef _UTILITYEXT
#define UTILITY_EXT_CLASS __declspec(dllexport)
#else
#define UTILITY_EXT_CLASS __declspec(dllimport)
#endif
class UTILITY_EXT_CLASS CStaticEx : public CStatic
{
// Construction
public:
	CStaticEx();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CStaticEx)
	//}}AFX_VIRTUAL

// Implementation
public:
	void SetFont(int nHeight, LPCTSTR fontName, BOOL bRedraw=TRUE);
	void SetTextColor(COLORREF TextColor);
	void SetBackColor(COLORREF BackColor);
	void SetText(CString strText, COLORREF TextColor=m_TextColor, COLORREF BackColor=m_BackColor);
	virtual ~CStaticEx();

	// Generated message map functions
protected:
	//{{AFX_MSG(CStaticEx)
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
private:
	CBrush m_DisBackBrush;
	CBrush m_BackBrush;
	CFont m_Font;

	static COLORREF m_BackColor;
	static COLORREF m_TextColor;
};

/////////////////////////////////////////////////////////////////////////////
#endif
